package com.job.landlord.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.job.common.entity.Role;
import com.job.common.entity.UserRole;
import com.job.landlord.mapper.UserRoleMapper;
import com.job.landlord.service.UserRoleService;
import io.swagger.v3.oas.annotations.media.Schema;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Schema(title = "用户角色")
@Service
public class UserRoleServiceImpl extends ServiceImpl<UserRoleMapper, UserRole> implements UserRoleService {
    @Autowired
    private UserRoleMapper userRoleMapper;
    @Override
    public List<Role> getRolesByUserId(Long id) {
        return userRoleMapper.getRolesByUserId(id);
    }
}
